package com.woniuxy.dao;

import com.woniuxy.model.ProjectRoleUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.utils.GetSqlUtil;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 马世亮
 * @since 2022-02-21
 */
public interface ProjectRoleUserDao extends BaseMapper<ProjectRoleUser> {

    @InsertProvider(type = GetSqlUtil.class,method = "insertProjectRoleUser")
    Integer insertmany(@Param("pru") String pru);

    @Select("SELECT project_id FROM project_role_user WHERE u_id=#{uid}")
    List<Integer> selectMyProject(Integer uid);
}
